package com.sise.wangzhan.client;

import feign.Headers;
import feign.Param;
import feign.RequestLine;
import lombok.Data;

/**
 * @Classname SumClient
 * @Description TODO
 * @Date 2020/4/9 9:46
 * @Created by wangzhan
 */
public interface SumClient {

    @RequestLine("POST /stu/sum")
    //声明请求类型为JSON
    @Headers("Content-Type: application/json")
    String getSum(Stu stu);


    @Data
    class Stu{
        Integer sid;
        String sname;
        int chinese;
        int math;
        int english;

        public Stu(Integer sid, String sname, int chinese, int math, int english) {
            this.sid = sid;
            this.sname = sname;
            this.chinese = chinese;
            this.math = math;
            this.english = english;
        }
    }
}
